package main

import "fmt"

func hello() {
	fmt.Println("hello, world!")
}

func hi(name string) {
	fmt.Println("hello,", name)
}

func halfer(val int) int {
	return val / 2
}

func sum(x, y int) int {
	return x + y
}

func giveMePear(fruid string) {
	fruid = "pear"
}

func giveMePearPtr(fruid *string) {
	*fruid = "pear"
}

func main() {

	hello()

	hi("rivenodr")

	fmt.Println(halfer(99))

	fmt.Println(sum(4, 8))

	fruid := "banana"
	giveMePear(fruid)
	fmt.Println(fruid)

	fmt.Println(&fruid, fruid)
	giveMePearPtr(&fruid)
	fmt.Println(&fruid, fruid)
}
